﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProductNews_Add.aspx.cs" MasterPageFile="/Admin/MasterPage.master"Inherits="Admin_Form_ProductNews_Add" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" ID="content" runat="server">
    
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
    <div style="text-align:left;">
    <telerik:RadAjaxPanel runat="server" ID="ajaxpanel1" LoadingPanelID="RadAjaxLoadingPanel1">
        <input type="hidden" id="txtProductID" runat="server" />
        
        <div><asp:Label runat="server" CssClass="AdminMessage" ID="lblMessage"></asp:Label></div>
        <asp:ListBox runat="server" ID="lstChooseNews" Height="50px" ></asp:ListBox>
        <asp:Button runat="server" ID="btnDelete" OnClick="btnDelete_Click" Text="Xóa" />
        <telerik:RadGrid runat="server" AllowMultiRowSelection="true" AllowFilteringByColumn="True" AutoGenerateColumns="false" ID="grd">
            <ClientSettings EnableRowHoverStyle="true">
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
            <MasterTableView>
                <Columns>
                    <telerik:GridClientSelectColumn UniqueName="SelectColumn" ></telerik:GridClientSelectColumn>
                    <telerik:GridBoundColumn Visible="false" DataField="NewsID" HeaderText="ID"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="NewsTitle" HeaderText="Tiêu đề" AllowFiltering="true"></telerik:GridBoundColumn>
                    <telerik:GridImageColumn DataImageUrlFields="NewsImage" ImageHeight="80px" ImageWidth="100px" HeaderText="Ảnh" AllowFiltering="true"></telerik:GridImageColumn>
                    <telerik:GridBoundColumn DataField="NewsSource" HeaderText="Nguồn" AllowFiltering="true"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ViewTime" HeaderText="Số lần xem" AllowFiltering="true"></telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Xóa">
                        <ItemTemplate>
                            <asp:LinkButton OnClick="News_Add" CommandArgument='<%# Eval("NewsID") %>' ID="LinkButton2" runat="server">Thêm</asp:LinkButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>
    
    <table>
        <tr>
            <td colspan="3" align="center">
                <asp:Button CssClass="AdminSaveButton" runat="server" ID="btnCreate" OnClick="btnCreate_Click" Text="Thêm Mới" />
                <asp:Button CssClass="AdminCancelButton" runat="server" ID="btnReset" OnClick="btnReset_Click" Text="Nhập Lại" />            
            </td>
        </tr>
    </table>
    
    
    </div>
</asp:Content>